<?php

require_once '../config.php';

$url      = $_SERVER['HTTP_REFERER'];
$domain   = parse_url($url, PHP_URL_HOST);
            visitors_update(session_id());
            
$visitor  = visitors_get_by_session_id(session_id());            
            
if ($visitor['administratorId'] == 0) {
  $administratorId = visitors_set_administratorId(session_id(), $domain);
  $visitor['administratorId'] = $administratorId;
}
 
visitors_add_log($visitor, $url);

include dirname(__FILE__) . '/widget.js';